import request from '@/utils/request'

// 查询出入库记录列表
export function listHistory(query) {
  return request({
    url: '/inventory/history/list',
    method: 'get',
    params: query
  })
}

// 查询出入库记录详细
export function getHistory(transactionId) {
  return request({
    url: '/inventory/history/' + transactionId,
    method: 'get'
  })
}

// 新增出入库记录
export function addHistory(data) {
  return request({
    url: '/inventory/history',
    method: 'post',
    data: data
  })
}

// 修改出入库记录
export function updateHistory(data) {
  return request({
    url: '/inventory/history',
    method: 'put',
    data: data
  })
}

// 删除出入库记录
export function delHistory(transactionId) {
  return request({
    url: '/inventory/history/' + transactionId,
    method: 'delete'
  })
}
